home *** CD-ROM | disk | FTP | other *** search
- /* gnuplotio.h */
- #include <stdio.h>
-
- #ifndef TRUE
- # define TRUE 1
- #endif
- #ifndef FALSE
- # define FALSE 0
- #endif
-
- typedef struct {
- FILE **ptr;
- } GNUPLOT;
-
- typedef struct {
- unsigned npts; /* number of points */
- int is_2d; /* True: only x,y are valid; z=NULL */
- int curveno; /* Curve id number */
- float *x; /* x[npts] */
- float *y; /* y[npts] */
- float *z; /* z[npts] */
- char *range; /* range[npts]: 'i' inrange,
- 'o' outrange,
- 'u' undefined */
- } GPCurve;
-
- extern GNUPLOT *openGnuplot(const char *gnuplotpath);
- extern int writeGnuplot(GNUPLOT *gp, const char *command);
- extern int readErrorGnuplot(GNUPLOT *gp, char *buf, size_t n);
- extern int readGnuplot(GNUPLOT *gp, char *buf, size_t n);
- extern GPCurve *readCurveGnuplot(GNUPLOT *gp);
- extern int readCurveHeadGnuplot(GNUPLOT *gp, int *curveno, int *npts);
- extern int readCurve2Gnuplot(GNUPLOT *gp, char *range, float *x, float *y,
- int npts);
- extern int readCurve3Gnuplot(GNUPLOT *gp,char *range,float *x,float *y,
- float *z, int npts);
- extern int closeGnuplot(GNUPLOT *gp, int quitflag);
-
-